<template>
  <div id="app">
    <router-view />
  </div>
</template>
<script>
export default {
  name: "App",
  mounted() {
    const ip =
      process.env.NODE_ENV === "development" ? "localhost" : "47.99.38.32";
    localStorage.setItem("ip", ip);
    localStorage.setItem("url", `http://${localStorage.getItem("ip")}:8088`);
    console.log("mounted 该环境为：", localStorage.getItem("url"));
    // this.$axios
    //   .post("user/login")
    //   .then((res) => {
    //     console.log("获得数据code");
    //     console.log(res.data);
    //   })
    //   .catch((error) => {
    //     console.log("error" + error.message);
    //   });

    // 清除本地存储的token
    // const locakToken = localStorage.getItem("token");
    // if (locakToken != "" || locakToken != null) {
    //   localStorage.removeItem("token");
    // }
  },
};
</script>

<style lang="less">
</style>
